package es.dk.hl.vo
{
	import es.dk.hl.model.HomeLinkModelLocator;

	[Bindable]
	public class PhotoVO
	{
		public static const item:String = "item";
		public static const wall:String = "wall";
		
		public var photoType:String;
		
		public var photoTitle:String;
		public var photoUrl:String;
		
		public function PhotoVO()
		{
		}
		
		public static function getSourcePhoto(photo:Object):String {
			var source:String = "";
			if (HomeLinkModelLocator.getInstance().appState == HomeLinkModelLocator.SERVICES_OFF){
				source=  XML(photo).@url;
			}
			if (HomeLinkModelLocator.getInstance().appState == HomeLinkModelLocator.SERVICES_ON){
				source=  PhotoVO(photo).photoUrl;
			}			
			return source;
		}	
		public static function getTypePhoto(photo:Object):String {
			var source:String = "";
			if (HomeLinkModelLocator.getInstance().appState == HomeLinkModelLocator.SERVICES_OFF){
				source=  XML(photo).@type;
			}
			if (HomeLinkModelLocator.getInstance().appState == HomeLinkModelLocator.SERVICES_ON){
				source=  PhotoVO(photo).photoType;
			}			
			return source;
		}			
	}
}